package com.rxjava.jdbc;

import java.util.List;

import rx.Observable;
import rx.subjects.ReplaySubject;
import rx.subjects.Subject;

public class RxJdbcService {
	public RxJdbc rx = new RxJdbc();
	public ReplaySubject<String> rs = ReplaySubject.create(1);
	public Observable<List<String>> query(){
		return rx.queryUser();
	}
	
	public void queryString(){
		Observable<String> s = rx.queryUser().flatMap(list -> Observable.from(list)).first();
		s.subscribe(rs);
	}
}
